﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Data.Linq.Mapping;
using System.Data.Linq;

namespace Sapro_Project
{
    [Table]
	public class Escola
	{
        public EntityRef<Professor> matriculaProf;
		public Escola()
		{
			// Insert code required on object creation below this point.
		}
        [Column(IsPrimaryKey = true)]
        public String Nome
        {
            get;
            set;
        }
        [Column(CanBeNull = false)]
        public Int32 Telefone
        {
            get;
            set;
        }
        [Column(CanBeNull = true)]
        public String Rua
        {
            get;
            set;
        }
        [Column(CanBeNull = true)]
        public Int32 Numero
        {
            get;
            set;
        }
        [Column(CanBeNull = false)]
        public Int32 Cep
        {
            get;
            set;
        }
        [Association(IsForeignKey = true, Storage = "matriculaProf")]
        public Professor Mat_professor
        {
            get{
                return matriculaProf.Entity;
            }
            set {
                matriculaProf.Entity = value;
            }
        }
	}
}